package com.laowang.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCyhShareRulesMapper;
import com.laowang.project.system.domain.MyCyhShareRules;
import com.laowang.project.system.service.MyCyhShareRulesService;

/**
 * 分享规则Service业务层处理
 *
 * @author laowang
 * @date 2023-10-31
 */
@Service
public class MyCyhShareRulesServiceImpl implements MyCyhShareRulesService {
    @Autowired
    private MyCyhShareRulesMapper myCyhShareRulesMapper;

    /**
     * 查询分享规则
     *
     * @param id 分享规则ID
     * @return 分享规则
     */
    @Override
    public MyCyhShareRules selectMyCyhShareRulesById(Integer id) {
        return myCyhShareRulesMapper.selectMyCyhShareRulesById(id);
    }

    /**
     * 查询分享规则列表
     *
     * @param myCyhShareRules 分享规则
     * @return 分享规则
     */
    @Override
    public List<MyCyhShareRules> selectMyCyhShareRulesList(MyCyhShareRules myCyhShareRules) {
        return myCyhShareRulesMapper.selectMyCyhShareRulesList(myCyhShareRules);
    }

    /**
     * 新增分享规则
     *
     * @param myCyhShareRules 分享规则
     * @return 结果
     */
    @Override
    public int insertMyCyhShareRules(MyCyhShareRules myCyhShareRules) {
        return myCyhShareRulesMapper.insertMyCyhShareRules(myCyhShareRules);
    }

    /**
     * 修改分享规则
     *
     * @param myCyhShareRules 分享规则
     * @return 结果
     */
    @Override
    public int updateMyCyhShareRules(MyCyhShareRules myCyhShareRules) {
        return myCyhShareRulesMapper.updateMyCyhShareRules(myCyhShareRules);
    }

    /**
     * 批量删除分享规则
     *
     * @param ids 需要删除的分享规则ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShareRulesByIds(Integer[] ids) {
        return myCyhShareRulesMapper.deleteMyCyhShareRulesByIds(ids);
    }

    /**
     * 删除分享规则信息
     *
     * @param id 分享规则ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhShareRulesById(Integer id) {
        return myCyhShareRulesMapper.deleteMyCyhShareRulesById(id);
    }
}
